/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package daa.levelup.forTasks;

import java.util.Scanner;

public class Equation {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        System.out.println("Enter number");
        Scanner sc = new Scanner(System.in);
        int numberN = sc.nextInt();
        int a = 0;
        for (int n = 1; n < numberN + 1; n++) {

            a = (n * (n + 1) * ((2 * n) + 1)) / 6;
        }
        System.out.println(a);
    }

}
